Question: A parametric graph is given by
\begin{align*}
x &= \cos t + \frac{t}{2}, \\
y &= \sin t.
\end{align*}How many times does the graph intersect itself between $x = 1$ and $x = 40$?
Answer: The portion of the path for $-\frac{5 \pi}{2} \le t \le \frac{7 \pi}{2}$ is shown below.  The corresponding value of $t$ is labelled for certain points.

[asy]
unitsize(1 cm);

pair moo (real t) {
 return (cos(t) + t/2, sin(t));
}

real t;
path foo = moo(-5/2*pi);

for (t = -5/2*pi; t <= 7/2*pi; t = t + 0.1) {
  foo = foo--moo(t);
}

draw(foo,red);

dot("$-\frac{5 \pi}{2}$", moo(-5/2*pi), S);
dot("$-\frac{3 \pi}{2}$", moo(-3/2*pi), N);
dot("$-\frac{\pi}{2}$", moo(-1/2*pi), S);
dot("$\frac{\pi}{2}$", moo(1/2*pi), N);
dot("$\frac{3 \pi}{2}$", moo(3/2*pi), S);
dot("$\frac{5 \pi}{2}$", moo(5/2*pi), N);
dot("$\frac{7 \pi}{2}$", moo(7/2*pi), S);
[/asy]

Thus, the path "repeats" with a period of $2 \pi$ (in $t$), and the path intersects itself once each period.  The $x$-coordinates of the points of intersection are of the form $\frac{(4n + 1) \pi}{4},$ where $n$ is an integer.  We note that
\[1 \le \frac{(4n + 1) \pi}{4} \le 40\]for $n = 1,$ $2,$ $\dots,$ $12,$ giving us $\boxed{12}$ points of intersection.